﻿using System.Reflection;
using CloudShot.Editor.CanvasFigures;

namespace CloudShot.Utils.Tweens
{
  public abstract class AnimationAdapter 
  {
    public IBoundingBoxFigure Target { get; private set; }
    protected PropertyInfo PropertyInfo { get; private set; }

    public string Name { get; private set; }
    public float Begin { get; protected set; }
    public float End { get; protected set; }

    public abstract void SetValue(float value);

    protected AnimationAdapter(IBoundingBoxFigure target, PropertyInfo propertyInfo, float begin, float end)
    {
      Target = target;
      PropertyInfo = propertyInfo;

      Begin = begin;
      End = end;

      Name = propertyInfo.Name;
    }
  }
}